import 'package:fish_redux/fish_redux.dart';

enum OrderViewAction {
  action,
  onGetData,
  onSetConfigData,
  onSetNormalData,
  onTapOther,
  onTapAddPic,
  onSubmit,
  onTapPic,
}

class OrderViewActionCreator {
  static Action onAction() {
    return const Action(OrderViewAction.action);
  }

  static Action onGetData(data) {
    return Action(OrderViewAction.onGetData, payload: data);
  }

  static Action onSetConfigData(model, data) {
    return Action(
      OrderViewAction.onSetConfigData,
      payload: {'data': data, 'model': model},
    );
  }

  static Action onSetNormalData(model) {
    return Action(OrderViewAction.onSetNormalData, payload: model);
  }

  static Action onTapAddPic(model) {
    return Action(OrderViewAction.onTapAddPic, payload: model);
  }

  static Action onTapOther(model) {
    return Action(OrderViewAction.onTapOther, payload: model);
  }

  static Action onSubmit() {
    return const Action(OrderViewAction.onSubmit);
  }

  static Action onTapPic(model, data) {
    return Action(
      OrderViewAction.onTapPic,
      payload: {'data': data, 'model': model},
    );
  }
}
